package com.baiyue.model.menu;

import com.baiyue.entity.Menu;
import lombok.Data;

import java.util.List;

/**
 * @author 伍波
 * @date 2023/4/17 0017 22:13
 */
@Data
public class MenuTreeDataResponse {
    private Integer id;
    private String name;
    private String path;
    private String iconCls;
    private List<MenuTreeDataResponse> children;

    public MenuTreeDataResponse(Menu menu) {
        this.id = menu.getId();
        this.name = menu.getName();
        // 将 url 赋值为 menu.getUrl()
        this.path = menu.getPath();
        this.iconCls = menu.getIconCls();
    }
}
